package org.example.exampreparationtreasure.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("question_categories")
public class QuestionCategory {

    @TableId(type = IdType.AUTO, value = "category_id")
    private Long id;

    @TableField("parent_category_id")
    private Long parentId;

    @TableField("category_name")
    private String name;

    private Integer level;

    @TableField("sort_weight")
    private Integer sortOrder;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private java.util.List<QuestionCategory> children;
}


